<cfcomponent displayname="Security Configuration" output="false">


   <cffunction name="init" access="public" returntype="SecurityConfiguration" output="false">
	  <cfargument name="javaInstance" type="any" required="false" default="">
	  <cfif arguments.javaInstance is ''>
	    <cfset loader = createObject('component' , 'ClassLoader').init() />
	    <cfset securityConfig = loader.create('org.owasp.esapi.ESAPI').securityConfiguration() />
	   <cfelse>
	     <cfset securityConfig = arguments.javaInstance />
	   </cfif>
		<cfreturn this />
  </cffunction>


  <cffunction name="getLogLevel" access="public" returntype="string">
    <cfreturn  securityConfig.getLogLevel()/><!--- se --->
  </cffunction>



  <cffunction name="setResourceDirectory" access="public" output="false" returntype="void">
    <cfargument name="resourceDir" type="string" hint="Fully qualified path to a directory" />
     <cfset createObject("java","java.lang.System").setProperty("org.owasp.esapi.resources" , resourceDir) />
  </cffunction>

  <cffunction name="getResourceDirectory" access="public" output="false" returntype="string">
     <cfreturn createObject("java","java.lang.System").getProperty("org.owasp.esapi.resources") />
  </cffunction>


</cfcomponent>